<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Constructor of Yaf_View_Simple</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="yaf-view-simple.clear.html">« Yaf_View_Simple::clear</a></li>
      <li style="float: right;"><a href="yaf-view-simple.display.html">Yaf_View_Simple::display »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.yaf-view-simple.html">Yaf_View_Simple</a></li>
    <li>Constructor of Yaf_View_Simple</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="yaf-view-simple.construct" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Yaf_View_Simple::__construct</h1>
  <p class="verinfo">(Yaf &gt;=1.0.0)</p><p class="refpurpose"><span class="refname">Yaf_View_Simple::__construct</span> &mdash; <span class="dc-title">Constructor of Yaf_View_Simple</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-yaf-view-simple.construct-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">final</span> <span class="modifier">public</span> <span class="methodname"><strong>Yaf_View_Simple::__construct</strong></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$tempalte_dir</code></span>, <span class="methodparam"><span class="type">array</span> <code class="parameter">$options</code><span class="initializer"> = ?</span></span>)</div>

  <p class="para rdfs-comment">

  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-yaf-view-simple.construct-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt>
<code class="parameter">tempalte_dir</code></dt>

    <dd>

     <p class="para">
      模板的基本路劲，默认为APPLICATOIN . &quot;/views&quot;
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">options</code></dt>

    <dd>

     <p class="para">
      <div class="parameterscode"><pre class="parameterscode">Options for the engine, as of Yaf 2.1.13, you can use short tag
      &quot;&lt;?=$var?&gt;&quot; in your template(regardless of &quot;short_open_tag&quot;), 
      so comes a option named &quot;short_tag&quot;,  you can switch this off 
      to prevent use short_tag in template.</pre>
</div>
     </p>
    </dd>

   
  </dl>

 </div>


 <div class="refsect1 examples" id="refsect1-yaf-view-simple.construct-examples">
  <h3 class="title">范例</h3>
  <div class="example" id="example-3899">
   <p><strong>示例 #1 <span class="function"><strong>Yaf_View_Simple::__constructor()</strong></span>example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />&nbsp;&nbsp;&nbsp;define&nbsp;</span><span style="color: #007700">(</span><span style="color: #DD0000">"TEMPLATE_DIRECTORY"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">APPLICATOIN_PATH&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/views'</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$view&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">Yaf_View_Simple</span><span style="color: #007700">(</span><span style="color: #0000BB">TEMPLATE_DIRECTORY</span><span style="color: #007700">,&nbsp;array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'short_tag'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">false&nbsp;</span><span style="color: #FF8000">//doesn't&nbsp;allow&nbsp;use&nbsp;short&nbsp;tag&nbsp;in&nbsp;template<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
   </div>

  </div>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-yaf-view-simple.construct-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">

  </p>
 </div>



</div></div></div></body></html>